Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions packages/react/src/BaseStyles.dev.stories.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/* Story-specific styles for BaseStyles dev stories */

.WithSxProps {
/* stylelint-disable-next-line color-named */
color: red;
/* stylelint-disable-next-line color-named */
background-color: blue;
/* stylelint-disable-next-line primer/typography, font-family-no-missing-generic-family-keyword */
font-family: Arial;
/* stylelint-disable-next-line primer/typography */
line-height: 1.5;
}

.WithSystemProps {
/* stylelint-disable-next-line color-named */
color: red;
/* stylelint-disable-next-line color-named */
background-color: blue;
/* stylelint-disable-next-line primer/typography, font-family-no-missing-generic-family-keyword */
font-family: Arial;
/* stylelint-disable-next-line primer/typography */
font-size: 14px;
/* stylelint-disable-next-line primer/typography */
line-height: 1.5;
display: flex;
}

.WithStyleProps {
/* Style prop styles are applied inline, no classes needed */
}
25 changes: 6 additions & 19 deletions packages/react/src/BaseStyles.dev.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import {BaseStyles} from '.'
import type {Meta} from '@storybook/react-vite'
import type {ComponentProps} from './utils/types'
import {clsx} from 'clsx'
import classes from './BaseStyles.dev.stories.module.css'

export default {
title: 'Behaviors/BaseStyles/Dev',
Expand All @@ -9,27 +11,12 @@ export default {

export const Default = () => 'Hello'

export const WithSxProps = () => (
<BaseStyles
sx={{
color: 'red',
backgroundColor: 'blue',
fontFamily: 'Arial',
lineHeight: '1.5',
}}
>
Hello
</BaseStyles>
)
export const WithSxProps = () => <div className={clsx(classes.WithSxProps)}>Hello</div>

export const WithSystemProps = () => (
<BaseStyles color="red" backgroundColor="blue" fontFamily="Arial" fontSize="14px" lineHeight="1.5" display="flex">
Hello
</BaseStyles>
)
export const WithSystemProps = () => <div className={clsx(classes.WithSystemProps)}>Hello</div>

export const WithStyleProps = () => (
<BaseStyles
<div
style={{
color: 'red',
backgroundColor: 'blue',
Expand All @@ -38,5 +25,5 @@ export const WithStyleProps = () => (
}}
>
Hello
</BaseStyles>
</div>
)