Skip to content

Commit

Permalink
Merge branch 'kl-gm-592' into kl-gm-592-border-radius-atoms
Browse files Browse the repository at this point in the history
  • Loading branch information
LinKCoding committed Aug 6, 2024
2 parents c346016 + a3c3537 commit 32e5be4
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const PropItem = styled.pre(
bg: 'background-disabled',
color: 'navy-700',
lineHeight: 'base',
borderRadius: '4px',
borderRadius: 'm',
})
);

Expand All @@ -38,7 +38,7 @@ export const PropGroupTag = styled.div(
py: 4,
px: 8,
fontSize: 14,
borderRadius: '4px',
borderRadius: 'm',
cursor: 'help',
border: 1,
'&:hover > div': {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const ColorScale: React.FC<{ colors: Record<string, string> }> = ({
<Card
p={0}
width="100%"
borderRadius="4px"
borderRadius="m"
display="grid"
minHeight="3rem"
gridAutoFlow="column"
Expand Down
2 changes: 1 addition & 1 deletion packages/styleguide/stories/Atoms/Tag.examples.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const TagExample: React.FC = () => {

<Background
bg="background-primary"
borderRadius="3px"
borderRadius="m"
mx={8}
my={24}
p={24}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,7 @@ import { system } from '@codecademy/gamut-styles';

const Box = styled.div(system.border);

<Box
border={1}
borderLeft="none"
borderRightStyle="dotted"
borderRadius="4px"
/>;
<Box border={1} borderLeft="none" borderRightStyle="dotted" borderRadius="m" />;
```

<Story name="border">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,3 +172,11 @@ export const lorem = `Lorem ipsum dolor sit amet, consectetur adipiscing elit, s
<Story name="breakpoints">
<DataTable {...TABLES.breakpoint} />
</Story>

## Border Radius

**Key**: `theme.borderRadii`

<Story name="borderRadii">
<DataTable {...TABLES.borderRadii} />
</Story>
38 changes: 38 additions & 0 deletions packages/styleguide/stories/Foundations/Theme/tables.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -333,3 +333,41 @@ export const breakpoint = {
{ ...VALUE_COLUMN, size: 'fill' },
],
};

export const borderRadii = {
rows: Object.entries(theme.borderRadii).map(([id, value]) => ({
id,
value,
})),
columns: [
PROP_COLUMN,
{
...PATH_COLUMN,
size: 'xl',
render: ({ id }: any) => <Code>theme.borderRadii.{id}</Code>,
},
{
...VALUE_COLUMN,
render: ({ value }: any) => (
<Box maxWidth="24rem">
<Code>{value.split(',')[0]}</Code>
</Box>
),
size: 'lg',
},
{
key: 'example',
name: 'Example',
size: 'fill',
render: ({ value }: any) => (
<Box
display="inline-block"
width="4rem"
height="4em"
bg="navy"
borderRadius={value}
/>
),
},
],
};
4 changes: 2 additions & 2 deletions packages/styleguide/stories/Molecules/Menu/Menu.examples.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const PopoverMenuExample: React.FC<PopoverContainerProps> = () => {
return (
<FlexBox minHeight="30px" width={1} position="relative" m={48}>
<FlexBox flex={1}>
<Background bg="black" height="100%" pl={48} borderRadius="10px">
<Background bg="black" height="100%" pl={48} borderRadius="l">
<FlexBox
bg="navy"
justifyContent="right"
Expand Down Expand Up @@ -103,7 +103,7 @@ export const PopoverMenuExample: React.FC<PopoverContainerProps> = () => {
y={currentTarget}
targetRef={target}
>
<Background bg="white" borderRadius="10px">
<Background bg="white" borderRadius="l">
<Menu variant="select" role="menu">
{activeIndex % 2 === 0 ? (
<>
Expand Down

0 comments on commit 32e5be4

Please sign in to comment.