-
Notifications
You must be signed in to change notification settings - Fork 62
Harryhao/cds 1513 consolidate listcell border props #352
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
base: cds-v9
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -794,6 +794,77 @@ const WithHelperText = () => ( | |
| </> | ||
| ); | ||
|
|
||
| const BorderCustomization = () => { | ||
| const [isCondensed, setIsCondensed] = useState(true); | ||
| const spacingVariant = isCondensed ? 'condensed' : 'normal'; | ||
|
|
||
| return ( | ||
| <VStack gap={2} padding={2}> | ||
| <Switch | ||
| checked={isCondensed} | ||
| onChange={(_, nextChecked) => setIsCondensed(Boolean(nextChecked))} | ||
| > | ||
| Spacing variant: {spacingVariant} | ||
| </Switch> | ||
| <ListCell | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nitL are this many examples necessary? Try to limit stories to a few key examples. Keep in mind the primary use case is visual regression testing and visual documentation/interaction.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok that make sense, I'll cut down the story here and only leave interesting/important examples |
||
| bordered | ||
| onPress={onPressConsole} | ||
| spacingVariant={spacingVariant} | ||
| title="bordered" | ||
| /> | ||
| <ListCell | ||
| borderedTop | ||
| onPress={onPressConsole} | ||
| spacingVariant={spacingVariant} | ||
| title="borderedTop" | ||
| /> | ||
| <ListCell | ||
| borderedHorizontal | ||
| onPress={onPressConsole} | ||
| spacingVariant={spacingVariant} | ||
| title="borderedHorizontal" | ||
| /> | ||
| <ListCell | ||
| bordered | ||
| borderColor="accentBoldPurple" | ||
| onPress={onPressConsole} | ||
| spacingVariant={spacingVariant} | ||
| title="borderColor" | ||
| /> | ||
| <ListCell | ||
| borderColor="bgLine" | ||
| borderWidth={200} | ||
| onPress={onPressConsole} | ||
| spacingVariant={spacingVariant} | ||
| title="borderWidth" | ||
| /> | ||
| <ListCell | ||
| borderColor="bgLine" | ||
| borderTopWidth={200} | ||
| onPress={onPressConsole} | ||
| spacingVariant={spacingVariant} | ||
| title="borderTopWidth" | ||
| /> | ||
| <ListCell | ||
| borderColor="bgLine" | ||
| borderRadius={200} | ||
| borderWidth={100} | ||
| onPress={onPressConsole} | ||
| spacingVariant={spacingVariant} | ||
| title="borderRadius" | ||
| /> | ||
| <ListCell | ||
| borderColor="bgLine" | ||
| borderTopLeftRadius={300} | ||
| borderWidth={100} | ||
| onPress={onPressConsole} | ||
| spacingVariant={spacingVariant} | ||
| title="borderTopLeftRadius" | ||
| /> | ||
| </VStack> | ||
| ); | ||
| }; | ||
|
|
||
| const CustomSpacing = () => ( | ||
| <> | ||
| <ListCell | ||
|
|
@@ -1213,6 +1284,9 @@ const ListCellScreen = () => { | |
| <Example inline title="WithHelperText" titlePadding={titlePadding}> | ||
| <WithHelperText /> | ||
| </Example> | ||
| <Example inline title="BorderCustomization" titlePadding={titlePadding}> | ||
| <BorderCustomization /> | ||
| </Example> | ||
| <Example inline title="CustomSpacing" titlePadding={titlePadding}> | ||
| <CustomSpacing /> | ||
| </Example> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please leave a comment: