Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Allow CSS overrides for TopBar wrapper element #710

Merged
merged 4 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
3 changes: 3 additions & 0 deletions lib/src/components/top-bar/TopBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,14 @@ type StyledRootProps = React.ComponentProps<typeof StyledRoot>

interface TopBarProps extends StyledRootProps {
css?: CSS
wrapperCss?: CSS
avirati marked this conversation as resolved.
Show resolved Hide resolved
className?: string
}

const TopBarComponent = ({
size = 'md',
className = topBarColorSchemes['light'],
wrapperCss,
...props
}: TopBarProps) => {
const { y: scrollPositionY } = useWindowScrollPosition()
Expand All @@ -63,6 +65,7 @@ const TopBarComponent = ({
className={className}
hasScrolled={!!scrollPositionY}
avirati marked this conversation as resolved.
Show resolved Hide resolved
size={size}
css={wrapperCss}
>
<Container {...props} />
</StyledRoot>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
},
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
"commit-msg": "npx commitlint -E HUSKY_GIT_PARAMS",
"pre-commit": "bash scripts/prevent-commit.sh && yarn lint-staged"
}
},
Expand Down
Loading