Skip to content

Commit

Permalink
Merge pull request #308 from wpmudev/new/use-styles
Browse files Browse the repository at this point in the history
✨ new(styles): added id as wrap for useStyles.
  • Loading branch information
emgk authored Jul 22, 2024
2 parents 8c75357 + 718fc59 commit 5123869
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,9 @@ const SuiWrapper = ({ children, context }) => {

return (
<WordPress>
<div className={`sui-wrap sui-theme--${suitheme}`}>{children}</div>
<div id="sui-wrap" className={`sui-wrap sui-theme--${suitheme}`}>
{children}
</div>
</WordPress>
)
}
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/src/components/preview/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const Preview: React.FunctionComponent<PreviewProps> = ({

return (
<Canvas className="csb-preview">
<div className="sui-wrap sui-theme--light">
<div id="sui-wrap" className="sui-wrap sui-theme--light">
{true === wrapper && (
<div className="sui-layout sui-layout--horizontal">{children}</div>
)}
Expand Down
2 changes: 1 addition & 1 deletion packages/hooks/src/use-styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export const CSS_SHORTHAND_MAPS: Record<string, string> = {
}

// We need this to wrap inline styles to prioritize
const parentSelector: string = "body .sui-wrap &"
const parentSelector: string = "body #sui-wrap &"

/**
* Build style object based on prop name and value
Expand Down

0 comments on commit 5123869

Please sign in to comment.