Skip to content

Commit

Permalink
call most things smoot-design
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherChudzicki committed Jul 1, 2024
1 parent d7e1dbb commit 9818c18
Show file tree
Hide file tree
Showing 24 changed files with 32 additions and 27 deletions.
13 changes: 9 additions & 4 deletions frontends/mit-open/.storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,15 @@ const preview: Preview = {
options: {
// @ts-expect-error These have type {import("@storybook/types").IndexEntry}
// But this function is run in JS and seems not to be compiled.
storySort: (a, b) =>
a.id === b.id
? 0
: a.id.localeCompare(b.id, undefined, { numeric: true }),
storySort: ({ id: a }, { id: b }) => {
if (a.slice(0, 3) === "old" && b.slice(0, 3) !== "old") {
return 1
}
if (b.slice(0, 3) === "old" && a.slice(0, 3) !== "old") {
return -1
}
return a.localeCompare(b, undefined, { numeric: true })
},
},
},
globals: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const PUBLIC_URL =
process.env.PUBLIC_URL || process.env.STORYBOOK_PUBLIC_URL || ""

const meta: Meta<typeof BannerPage> = {
title: "ol-components/BannerPage",
title: "old/BannerPage",
render: (props) => (
<BannerPage {...props}>
<Typography variant="h1">Page content</Typography>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { BasicDialog } from "./BasicDialog"
import Typography from "@mui/material/Typography"

const meta: Meta<typeof BasicDialog> = {
title: "ol-components/BasicDialog",
title: "smoot-design/BasicDialog",
render: (props) => (
<BasicDialog {...props}>
<Typography variant="h1">Dialog Content</Typography>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { withRouter } from "storybook-addon-react-router-v6"
import styled from "@emotion/styled"

const meta: Meta<typeof Breadcrumbs> = {
title: "ol-components/Breadcrumbs",
title: "smoot-design/Breadcrumbs",
component: Breadcrumbs,
decorators: [withRouter],
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { RiMenuAddLine, RiBookmarkLine } from "@remixicon/react"
import { withRouter } from "storybook-addon-react-router-v6"

const meta: Meta<typeof Card> = {
title: "ol-components/Card",
title: "smoot-design/Cards/Card",
argTypes: {
size: {
options: ["small", "medium"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const StyledCarousel = styled(Carousel)({
})

const meta: Meta<typeof Carousel> = {
title: "ol-components/Carousel",
title: "smoot-design/Carousel",
render: (props) => (
<div>
This carousel:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const StateWrapper = (props: CheckboxProps) => {
}

const meta: Meta<typeof Checkbox> = {
title: "ol-components/Checkbox",
title: "smoot-design/Checkbox",
component: StateWrapper,
argTypes: {
onChange: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const StateWrapper = (props: ChoiceBoxProps) => {
}

const meta: Meta<typeof ChoiceBox> = {
title: "ol-components/ChoiceBox",
title: "smoot-design/ChoiceBox",
component: StateWrapper,
argTypes: {
type: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const StateWrapper = (props: CheckboxChoiceBoxFieldProps) => {
}

const meta: Meta<typeof CheckboxChoiceBoxField> = {
title: "ol-components/ChoiceBoxField",
title: "smoot-design/ChoiceBoxField",
component: StateWrapper,
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const StateWrapper = (props: RadioChoiceBoxFieldProps) => {
}

const meta: Meta<typeof RadioChoiceBoxField> = {
title: "ol-components/ChoiceBoxField",
title: "smoot-design/ChoiceBoxField",
component: StateWrapper,
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const DialogDemo = (props: FormDialogProps) => {
}

const meta: Meta<typeof FormDialog> = {
title: "ol-components/FormDialog",
title: "smoot-design/FormDialog",
component: DialogDemo,
argTypes: {
onReset: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const LearningResourceCardStyled = styled(LearningResourceCard)`
`

const meta: Meta<typeof LearningResourceCard> = {
title: "ol-components/LearningResourceCard",
title: "smoot-design/Cards/LearningResourceCard",
argTypes: {
resource: {
options: ["Loading", "Without Image", ...Object.values(ResourceTypeEnum)],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const makeResource: typeof _makeResource = (overrides) => {
}

const meta: Meta<typeof LearningResourceListCard> = {
title: "ol-components/LearningResourceListCard",
title: "smoot-design/Cards/LearningResourceListCard",
argTypes: {
resource: {
options: ["Loading", ...Object.values(ResourceTypeEnum)],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const makeResource: typeof _makeResource = (overrides) => {
}

const meta: Meta<typeof LearningResourceExpanded> = {
title: "ol-components/LearningResourceExpanded",
title: "smoot-design/LearningResourceExpanded",
component: LearningResourceExpanded,
args: {
imgConfig: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Meta, StoryObj } from "@storybook/react"
import { LoadingSpinner } from "./LoadingSpinner"

const meta: Meta<typeof LoadingSpinner> = {
title: "ol-components/LoadingSpinner",
title: "smoot-design/LoadingSpinner",
component: LoadingSpinner,
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const NavDrawerDemo = () => {
}

const meta: Meta<typeof NavDrawer> = {
title: "ol-components/NavDrawer",
title: "smoot-design/NavDrawer",
component: NavDrawerDemo,
argTypes: {
onReset: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const Item = styled.li`
`

const meta: Meta<typeof PlainList> = {
title: "ol-components/PlainList",
title: "smoot-design/PlainList",
render: (args) => {
return (
<PlainList {...args}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const StateWrapper = (props: RadioProps) => {
}

const meta: Meta<typeof Radio> = {
title: "ol-components/Radio",
title: "smoot-design/Radio",
component: StateWrapper,
argTypes: {
onChange: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function StateWrapper(props: BooleanRadioChoiceFieldProps) {
}

const meta: Meta<typeof BooleanRadioChoiceField> = {
title: "ol-components/BooleanRadioChoiceField",
title: "~smoot-design/BooleanRadioChoiceField",
component: StateWrapper,
argTypes: {
onChange: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useArgs } from "@storybook/preview-api"
import { RadioChoiceField, BooleanRadioChoiceField } from "./RadioChoiceField"

const meta: Meta<typeof RadioChoiceField> = {
title: "ol-components/RadioChoiceField",
title: "smoot-design/RadioChoiceField",
argTypes: {
onChange: {
action: "changed",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const Content = styled.div({
})

const meta: Meta<typeof RoutedDrawer> = {
title: "ol-components/RoutedDrawer",
title: "smoot-design/RoutedDrawer",
decorators: [withRouter],
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { Meta, StoryObj } from "@storybook/react"
import { ShareTooltip } from "./ShareTooltip"

const meta: Meta<typeof ShareTooltip> = {
title: "ol-components/ShareTooltip",
title: "old/ShareTooltip",
component: ShareTooltip,
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Meta, StoryObj } from "@storybook/react"
import { TruncateText } from "./TruncateText"

const meta: Meta<typeof TruncateText> = {
title: "ol-components/TruncateText",
title: "smoot-design/TruncateText",
component: TruncateText,
argTypes: {
lineClamp: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const BreakpointsDemo = () => {
}

const meta: Meta<typeof BreakpointsDemo> = {
title: "ol-components/Breakpoints",
title: "smoot-design/Container Breakpoints",
component: BreakpointsDemo,
parameters: {
viewports: {},
Expand Down

0 comments on commit 9818c18

Please sign in to comment.