Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Card padding properties over 9 fail #339

Open
edwardoverthere opened this issue Jan 27, 2021 · 1 comment
Open

Card padding properties over 9 fail #339

edwardoverthere opened this issue Jan 27, 2021 · 1 comment

Comments

@edwardoverthere
Copy link

While using a card component, inputting any single number over 9 as a property for padding breaks the functionality.

This works fine - padding is as expected:

<Card padding={9}>
  Some content
</Card>

This breaks - padding is no longer applied at all:

<Card padding={10}>
  Some content
</Card>
@LiamMartens
Copy link
Contributor

@EdwardGoomba I believe this is because the Sanity theme only has 10 total padding values (as can be seen here theme.ts)

If you need more than this you might want to just assign custom padding yourself using styled components

import styled from 'styled-components'

const CardWithLargePadding = styled(Card)`
  padding: 500px;
`

return <CardWithLargePadding />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants