-
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.
Showing
10 changed files
with
145 additions
and
42 deletions.
There are no files selected for viewing
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,31 @@ | ||
/* Prevent intercom lanucher from showing up */ | ||
.ic-launcher #intercom-container, | ||
.intercom-launcher { | ||
display: none; | ||
} | ||
|
||
* { | ||
box-sizing: border-box; | ||
} | ||
|
||
html, | ||
body { | ||
font-family: 'Source Sans Pro', Helvetica, sans-serif; | ||
height: 100%; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
a { | ||
text-decoration: none; | ||
color: #00aeef; /** TODO fetch from design tokens **/ | ||
} | ||
|
||
a:hover { | ||
color: #008bbf; | ||
} | ||
|
||
table { | ||
border-spacing: 0; | ||
border-collapse: collapse; | ||
} |
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,6 @@ | ||
<link rel="preconnect" href="https://fonts.googleapis.com" /> | ||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> | ||
<link | ||
href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:ital,wght@0,400;0,600;1,400&family=Ubuntu+Mono:wght@400;700&display=fallback&display=swap" | ||
rel="stylesheet" | ||
/> |
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
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
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
19 changes: 19 additions & 0 deletions
19
src/components/OrderedListItem/OrderedListItem.stories.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,19 @@ | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
import { OrderedListItem } from '.'; | ||
import { Typography } from '@mui/material'; | ||
|
||
const meta = { | ||
title: 'Typography/Ordered List Item', | ||
component: OrderedListItem, | ||
tags: ['autodocs'], | ||
} satisfies Meta<typeof OrderedListItem>; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof meta>; | ||
|
||
export const Default: Story = { | ||
args: { | ||
index: 1, | ||
children: <Typography variant="body1">Hello world</Typography>, | ||
}, | ||
}; |
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,44 @@ | ||
import { | ||
Avatar, | ||
Box, | ||
ListItem, | ||
ListItemIcon, | ||
ListItemProps, | ||
Typography, | ||
} from '@mui/material'; | ||
|
||
export interface OrderedListItemProps extends ListItemProps { | ||
index: number; | ||
} | ||
|
||
export const OrderedListItem: React.FC<OrderedListItemProps> = ({ | ||
index, | ||
children, | ||
...orderedListItemProps | ||
}) => { | ||
return ( | ||
<ListItem | ||
sx={{ pl: 0, ...orderedListItemProps.sx }} | ||
{...orderedListItemProps} | ||
> | ||
<ListItemIcon> | ||
<Box | ||
sx={{ | ||
borderRadius: '50%', | ||
backgroundColor: 'info.main', | ||
width: '1.5em', | ||
height: '1.5em', | ||
display: 'flex', | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
}} | ||
> | ||
<Typography variant="body2" color="white"> | ||
{index} | ||
</Typography> | ||
</Box> | ||
</ListItemIcon> | ||
{children} | ||
</ListItem> | ||
); | ||
}; |
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