diff --git a/.github/workflows/publish-chromatic.yml b/.github/workflows/publish-chromatic.yml new file mode 100644 index 00000000..b0592c62 --- /dev/null +++ b/.github/workflows/publish-chromatic.yml @@ -0,0 +1,41 @@ +name: Publish to Chromatic + +on: + push: + branches: + - main + paths: + - '.storybook/**' + - 'src/**' + tags-ignore: + - '**' + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: chromatic + cancel-in-progress: true + +jobs: + chromatic: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + - name: Install dependencies + run: npm ci + - name: Build Storybook + run: npm run build:storybook + - uses: chromaui/action@v1 + with: + projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} + storybookBuildDir: storybook + exitZeroOnChanges: true + autoAcceptChanges: true diff --git a/.github/workflows/publish-storybook.yml b/.github/workflows/publish-storybook.yml index 3637080b..2cbab4f7 100644 --- a/.github/workflows/publish-storybook.yml +++ b/.github/workflows/publish-storybook.yml @@ -1,4 +1,4 @@ -name: Publish Storybook +name: Publish to GitHub pages on: push: @@ -50,23 +50,3 @@ jobs: path: storybook - id: deployment uses: actions/deploy-pages@v4 - - chromatic: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - uses: actions/setup-node@v4 - with: - node-version-file: .nvmrc - - name: Install dependencies - run: npm ci - - name: Build Storybook - run: npm run build:storybook - - uses: chromaui/action@v1 - with: - projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} - storybookBuildDir: storybook - exitZeroOnChanges: true - autoAcceptChanges: true diff --git a/.storybook/storybook.scss b/.storybook/storybook.scss index 55ea25bc..076eb4d4 100644 --- a/.storybook/storybook.scss +++ b/.storybook/storybook.scss @@ -242,6 +242,10 @@ p:not(:first-child) { margin-top: 0.25rem; } + + .tna-ul { + margin-top: 0.25rem; + } } .tna-form__group { diff --git a/CHANGELOG.md b/CHANGELOG.md index 99f0e95e..69f680c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased](https://github.com/nationalarchives/tna-frontend/compare/v0.1.52...HEAD) ### Added + +- Footer component can now contain an optional theme selector which requires the component to have JavaScript initialised +- The Cookie library is now a singleton + ### Changed ### Deprecated ### Removed diff --git a/src/nationalarchives/components/button/button.scss b/src/nationalarchives/components/button/button.scss index 55fe9a15..4a7f5076 100644 --- a/src/nationalarchives/components/button/button.scss +++ b/src/nationalarchives/components/button/button.scss @@ -68,7 +68,7 @@ $button-border-width: 4px !default; &--small#{&}--plain, &-group--small &--plain { - @include typography.main-font-weight-bold; + // @include typography.main-font-weight-bold; } &--accent { diff --git a/src/nationalarchives/components/footer/footer.scss b/src/nationalarchives/components/footer/footer.scss index 5dd08015..f8a6c677 100644 --- a/src/nationalarchives/components/footer/footer.scss +++ b/src/nationalarchives/components/footer/footer.scss @@ -15,6 +15,10 @@ .tna-button-group { justify-content: flex-end; } + + .tna-button { + @include typography.main-font-weight-bold; + } } &__theme-selector-button { diff --git a/src/nationalarchives/stories/utilities/colour-schemes/colour-combinations.stories.js b/src/nationalarchives/stories/utilities/colour-schemes/colour-combinations.stories.js index be400d30..2332a95a 100644 --- a/src/nationalarchives/stories/utilities/colour-schemes/colour-combinations.stories.js +++ b/src/nationalarchives/stories/utilities/colour-schemes/colour-combinations.stories.js @@ -65,7 +65,10 @@ const Template = ({ theme }) => {

Heading

Text / Dark / Light /

Link / Link (visited)

-