diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 3c8e966..eeb0e68 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -32,7 +32,7 @@ jobs: - name: Get yarn cache directory path id: yarn-cache-dir-path run: 'echo "::set-output name=dir::$(yarn cache dir)"' - - uses: actions/cache@v1 + - uses: actions/cache@v4 id: yarn-cache with: path: '${{ steps.yarn-cache-dir-path.outputs.dir }}' @@ -54,7 +54,7 @@ jobs: - name: Get yarn cache directory path id: yarn-cache-dir-path run: 'echo "::set-output name=dir::$(yarn cache dir)"' - - uses: actions/cache@v1 + - uses: actions/cache@v4 id: yarn-cache with: path: '${{ steps.yarn-cache-dir-path.outputs.dir }}' diff --git a/CHANGELOG.md b/CHANGELOG.md index 25c693e..9b6dd0d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,10 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). - ## [Unreleased] +## [Unreleased] + + ### Fixed ++ - option for client to pass aria-label as a variable ## [0.1.2] - 2025-03-10 + + ### Added + - aria-label property for stack layout diff --git a/docs/README.md b/docs/README.md index 40f9b44..02512e1 100644 --- a/docs/README.md +++ b/docs/README.md @@ -30,6 +30,7 @@ This means `flex-layout.row#viewone` will appear on the bottom, `flex-layout.row | -------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | | `blockClass` | `string` | Allows to pass a custom name to be added to component CSS classes. | `null` | | `zIndexOffset` | `number` | An offset to be passed to the zIndex of the children of the stack layout. If you pass `3`, the first children will have `zIndex` of 3, and the next layer will have `zIndex` of 4, and so on. | `0` | +| `arialabel` | `string` | A value to customize the aria-label property | `null` | ## Customization diff --git a/react/index.tsx b/react/index.tsx index 3759ede..0ab07e0 100644 --- a/react/index.tsx +++ b/react/index.tsx @@ -4,17 +4,19 @@ import { useCssHandles, applyModifiers } from 'vtex.css-handles' const CSS_HANDLES = ['stackContainer', 'stackItem'] as const interface Props { - zIndexOffset?: number + zIndexOffset?: number, + arialabel?: string } const StackLayout: StorefrontFunctionComponent = ({ children, - zIndexOffset = 0 + zIndexOffset = 0, + arialabel }) => { const handles = useCssHandles(CSS_HANDLES) const intl = useIntl() return ( -
{React.Children.toArray(children).map((child, idx) => {