-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(react-components): 🎸 add MntVisuallyHidden component
- Loading branch information
1 parent
0b42e6f
commit 8263b4d
Showing
6 changed files
with
22 additions
and
1 deletion.
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
8 changes: 8 additions & 0 deletions
8
packages/react-components/src/components/atoms/VisuallyHidden/VisuallyHidden.classes.ts
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,8 @@ | ||
const visuallyHiddenClasses = { | ||
'.mnt-visually-hidden': { | ||
'@apply inline-block absolute overflow-hidden [clip-path:rect(0,0,0,0)] w-px h-px -m-px p-0 border-0': | ||
{} | ||
} | ||
}; | ||
|
||
export default visuallyHiddenClasses; |
8 changes: 8 additions & 0 deletions
8
packages/react-components/src/components/atoms/VisuallyHidden/VisuallyHidden.tsx
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,8 @@ | ||
import mnt from 'react-mnt'; | ||
|
||
/** | ||
* A11y utility component to render visually hidden elements on the DOM | ||
*/ | ||
export const MntVisuallyHidden = mnt('span')` | ||
mnt-visually-hidden | ||
`; |
1 change: 1 addition & 0 deletions
1
packages/react-components/src/components/atoms/VisuallyHidden/index.ts
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 @@ | ||
export { MntVisuallyHidden } from './VisuallyHidden'; |
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
8263b4d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
mountain-ui-react-hooks – ./
react-hooks.mountain-ui.com
mountain-ui-react-hooks-git-master-tonyghiani.vercel.app
mountain-ui-react-hooks-tonyghiani.vercel.app
8263b4d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
mountain-ui-react-components – ./