-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DW-3497] Descriptor isolated placement
- Loading branch information
1 parent
f3c1804
commit 5ad2b79
Showing
7 changed files
with
49 additions
and
30 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,4 @@ | |
@use "selector-toggle"; | ||
@use "summary-list"; | ||
@use "avatar"; | ||
@use "descriptors"; |
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,11 @@ | ||
%digital-heading { | ||
color: #231f20; | ||
font-family: "FrutigerLTW01-65Bold.woff2", sans-serif; | ||
font-size: 32px; | ||
font-weight: bold; | ||
line-height: 40px; | ||
} | ||
|
||
.digital-descriptor-text { | ||
@extend %digital-heading; | ||
} |
35 changes: 35 additions & 0 deletions
35
src/nhsd/components/atoms/descriptors/descriptors.stories.js
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,35 @@ | ||
// Load storybook config | ||
import * as sbConfig from '../../../../../.storybook/storybook-config'; | ||
|
||
// Load template file | ||
import template from './template.njk'; | ||
|
||
const componentName = 'Digital descriptor'; | ||
const storyDescription = `${sbConfig.heading.lab}`; | ||
const sourceCode = `// Sass import \n@use "nhsd/components/atoms/descriptors"; | ||
// HTML`; | ||
|
||
// Component defaults | ||
export default { | ||
title: `${sbConfig.title.designSystem} / ${sbConfig.title.components} / ${sbConfig.title.atoms} / ${componentName}`, | ||
parameters: { | ||
docs: { | ||
description: { | ||
component: storyDescription, | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
const Template = (args) => template.render({ params: { ...args } }); | ||
|
||
export const LabComponent = Template.bind({}); | ||
LabComponent.storyName = sbConfig.title.lab; | ||
LabComponent.parameters = { | ||
docs: { | ||
source: { | ||
code: `${sourceCode}\n${LabComponent()}`, | ||
}, | ||
}, | ||
}; |
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 @@ | ||
<p class="digital-descriptor-text">Digital</p> |
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