From 8059778733b0568a1c93c23b7057468b2103e1f3 Mon Sep 17 00:00:00 2001 From: Luke Brennan Date: Mon, 8 Jan 2024 19:03:02 -0800 Subject: [PATCH] Update docs december 2023 (#5327) * chore(docs): fix ButtonDock typeo * chore(docs): skeleton - document autoSizeRows * chore(docs): add chevron small icons * chore(docs): document alwaysShowDescription and horizontal variant of progress-steps --- .../components/yard/config/progress-steps.ts | 19 +++++- .../components/yard/config/skeleton.ts | 6 +- .../examples/progress-steps/horizontal.tsx | 66 +++++++++++++++++++ .../examples/skeleton/auto-size-rows.tsx | 8 +++ .../pages/components/progress-steps.mdx | 8 +++ .../pages/components/skeleton.mdx | 7 ++ documentation-site/routes.jsx | 2 +- src/icon/icon-exports.ts | 4 ++ 8 files changed, 117 insertions(+), 3 deletions(-) create mode 100644 documentation-site/examples/progress-steps/horizontal.tsx create mode 100644 documentation-site/examples/skeleton/auto-size-rows.tsx diff --git a/documentation-site/components/yard/config/progress-steps.ts b/documentation-site/components/yard/config/progress-steps.ts index 34af05e08f..dd5e21cd22 100644 --- a/documentation-site/components/yard/config/progress-steps.ts +++ b/documentation-site/components/yard/config/progress-steps.ts @@ -5,7 +5,7 @@ This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree. */ -import { ProgressSteps, Step } from "baseui/progress-steps"; +import { ProgressSteps, Step, ORIENTATION } from "baseui/progress-steps"; import { Button } from "baseui/button"; import { PropTypes } from "react-view"; import type { TConfig } from "../types"; @@ -18,6 +18,7 @@ const ProgressStepsConfig: TConfig = { scope: { ProgressSteps, Step, + ORIENTATION, Button, }, theme: [""], @@ -28,6 +29,22 @@ const ProgressStepsConfig: TConfig = { description: "Defines the current active step index.", stateful: true, }, + orientation: { + value: "ORIENTATION.vertical", + defaultValue: "ORIENTATION.vertical", + type: PropTypes.Enum, + options: ORIENTATION, + description: "The orientation of the progress steps component.", + imports: { + "baseui/progress-steps": { named: ["ORIENTATION"] }, + }, + }, + alwaysShowDescription: { + value: false, + type: PropTypes.Boolean, + description: + "When true, each step's description will always be displayed regardless of whether it is the currently active step", + }, children: { value: `

Address on file: 1455 Market Street

diff --git a/documentation-site/components/yard/config/skeleton.ts b/documentation-site/components/yard/config/skeleton.ts index 809188468a..f023595b40 100644 --- a/documentation-site/components/yard/config/skeleton.ts +++ b/documentation-site/components/yard/config/skeleton.ts @@ -42,7 +42,11 @@ const SkeletonConfig: TConfig = { type: PropTypes.Boolean, description: "Lets you choose whether the skeleton has an animation", }, - + autoSizeRows: { + value: false, + type: PropTypes.Boolean, + description: "Dynamically sizes the skeleton rows to fit the container", + }, overrides: { value: undefined, type: PropTypes.Custom, diff --git a/documentation-site/examples/progress-steps/horizontal.tsx b/documentation-site/examples/progress-steps/horizontal.tsx new file mode 100644 index 0000000000..7e67114821 --- /dev/null +++ b/documentation-site/examples/progress-steps/horizontal.tsx @@ -0,0 +1,66 @@ +import * as React from 'react'; +import { + ProgressSteps, + NumberedStep, + ORIENTATION, +} from 'baseui/progress-steps'; +import { + Button, + SHAPE, + ButtonProps, + KIND, + SIZE, +} from 'baseui/button'; + +function SpacedButton(props: ButtonProps) { + return ( +