-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from BrahimS/button-styleguide
feat(ui): add buttons to style guilde
- Loading branch information
Showing
11 changed files
with
300 additions
and
75 deletions.
There are no files selected for viewing
50 changes: 50 additions & 0 deletions
50
apps/uikit/src/app/components/StyleGuide/Buttons/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import { | ||
Box, | ||
Button, | ||
FlexBox, | ||
TagText, | ||
theme, | ||
} from '@react-monorepo/shared-ui'; | ||
import React from 'react'; | ||
|
||
export const Buttons = () => { | ||
return ( | ||
<Box | ||
display="flex" | ||
flexDirection="row" | ||
justifyContent="space-between" | ||
alignItems="start" | ||
flexWrap="wrap" | ||
w="38%" | ||
p={theme.spacing.sm} | ||
shadow={theme.shadows.medium} | ||
borderRadius={theme.spacing.sm} | ||
as={'div'} | ||
asChild={false} | ||
> | ||
<Box as="div" asChild w="100%" p="8px 0" justifyContent="start"> | ||
<TagText>Buttons</TagText> | ||
</Box> | ||
<FlexBox | ||
display="flex" | ||
direction="row" | ||
justify="space-between" | ||
gap="4" | ||
align="center" | ||
> | ||
<Button variant="solid" color="primary" size="medium"> | ||
Primary | ||
</Button> | ||
<Button variant="outlined" color="secondary" size="medium"> | ||
Outlined | ||
</Button> | ||
<Button variant="ghost" color="danger" size="medium"> | ||
Ghost | ||
</Button> | ||
<Button variant="solid" color="primary" size="medium" disabled> | ||
Disabled | ||
</Button> | ||
</FlexBox> | ||
</Box> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import { Box, colorScheme, TagText, theme } from '@react-monorepo/shared-ui'; | ||
import React from 'react'; | ||
|
||
export const Colors = () => { | ||
return ( | ||
<Box | ||
display="flex" | ||
flexDirection="row" | ||
justifyContent="space-between" | ||
alignItems="start" | ||
flexWrap="wrap" | ||
w="38%" | ||
p={theme.spacing.md} | ||
shadow={theme.shadows.medium} | ||
borderRadius={theme.spacing.sm} | ||
as={'div'} | ||
asChild={false} | ||
> | ||
<Box as="div" asChild w="100%"> | ||
<TagText>Colors</TagText> | ||
</Box> | ||
{Object.entries(colorScheme).map(([key, value]) => ( | ||
<Box | ||
key={key} | ||
w="86px" | ||
h="86px" | ||
display="flex" | ||
flexDirection="column" | ||
justifyContent="center" | ||
alignItems="center" | ||
shadow={theme.shadows.medium} | ||
flexWrap="wrap" | ||
borderRadius={theme.spacing.xs} | ||
m={theme.spacing.xs} | ||
bg={value} | ||
style={{ | ||
color: | ||
value === theme.colors.white || value === theme.colors.cream | ||
? theme.colors.black | ||
: theme.colors.white, | ||
}} | ||
as="div" | ||
asChild | ||
> | ||
{key} | ||
</Box> | ||
))} | ||
</Box> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Box, Heading } from '@react-monorepo/shared-ui'; | ||
import React from 'react'; | ||
|
||
export const Intro = () => { | ||
return ( | ||
<Box w="100%" as="div" asChild> | ||
<Heading as="h1">UI Kit Library</Heading> | ||
<p> | ||
Lorem ipsum dolor sit amet consectetur adipisicing elit. Atque | ||
voluptatem distinctio eveniet voluptatum est iste, laudantium a officiis | ||
architecto, aspernatur veniam provident harum assumenda tempora dolorum! | ||
</p> | ||
</Box> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.