-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: replaced dh badgecounter with utrecht badgecounter, added badge…
…counter option to mobile menu
- Loading branch information
1 parent
a74d384
commit bb8570a
Showing
10 changed files
with
86 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
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 |
---|---|---|
@@ -1,12 +1 @@ | ||
@import "~@utrecht/components/dist/badge-counter/css"; | ||
|
||
.denhaag-badge-counter { | ||
--denhaag-dot-indicator-size: 8px; | ||
} | ||
|
||
.denhaag-badge-counter__counter { | ||
@extend .utrecht-badge-counter; | ||
|
||
font-family: var(--utrecht-badge-counter-font-family); | ||
font-size: var(--utrecht-badge-counter-font-size); | ||
} |
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 |
---|---|---|
@@ -1,24 +1,5 @@ | ||
import React, { HTMLAttributes } from 'react'; | ||
import { DotIndicator } from '@gemeente-denhaag/dotindicator'; | ||
import { BadgeCounter, BadgeCounterProps } from '@utrecht/component-library-react'; | ||
import './index.scss'; | ||
import clsx from 'clsx'; | ||
|
||
export type BadgeCounterProps = HTMLAttributes<HTMLDivElement>; | ||
|
||
/** | ||
* A counter badge notifies a user of a specific amount of updates. | ||
* @param props The properties of a Badge component. | ||
* @constructor Constructs an instance of Badge. | ||
*/ | ||
export const BadgeCounter: React.FC<BadgeCounterProps> = (props: BadgeCounterProps) => { | ||
const rootClassNames = clsx('denhaag-badge-counter', props.className); | ||
return ( | ||
<div id={props.id} className={rootClassNames}> | ||
<DotIndicator overlap={'rectangle'}> | ||
<div className={'denhaag-badge-counter__counter'}>{props.children}</div> | ||
</DotIndicator> | ||
</div> | ||
); | ||
}; | ||
|
||
export { BadgeCounter, BadgeCounterProps }; | ||
export default BadgeCounter; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import React, { HTMLAttributes } from 'react'; | ||
import clsx from 'clsx'; | ||
|
||
export interface MobileMenuLinkLabelProps extends HTMLAttributes<HTMLDivElement> {} | ||
|
||
export const MobileMenuLinkLabel = ({ className, children, ...props }: MobileMenuLinkLabelProps) => { | ||
const classNames = clsx('denhaag-mobile-menu-list-item-link-label', className); | ||
|
||
return ( | ||
<div {...props} className={classNames}> | ||
{children} | ||
</div> | ||
); | ||
}; | ||
|
||
export default MobileMenuLinkLabel; |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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