From 363df0df34e3d5703516d1814ba07cb90cf53623 Mon Sep 17 00:00:00 2001 From: matthias Date: Wed, 30 Oct 2024 11:53:50 +0100 Subject: [PATCH] feat(docs): refactor & revert --- .../forms/_forms-toggle_styleguide.md | 4 +-- .../docs/controls/forms/forms-validation.mdx | 2 +- .../components/ApiTableTag/ApiTableTag.css | 13 +++------- .../src/components/Tags/LegacyTag.css | 22 +++------------- .../src/components/Tags/index.tsx | 26 ++++--------------- 5 files changed, 16 insertions(+), 51 deletions(-) diff --git a/packages/documentation/docs/controls/forms/_forms-toggle_styleguide.md b/packages/documentation/docs/controls/forms/_forms-toggle_styleguide.md index 6c67ea8e07..8231c4a9af 100644 --- a/packages/documentation/docs/controls/forms/_forms-toggle_styleguide.md +++ b/packages/documentation/docs/controls/forms/_forms-toggle_styleguide.md @@ -31,5 +31,5 @@ Don't use toggles for actions that are irreversible or have serious consequences - [Form field](forms-field.md) - [Validation](forms-validation.mdx) - [Layout](forms-layout.md) -- [Checkbox](../checkbox.mdx) -- [Radio](../radio.mdx) +- [Checkbox](../checkbox.mdx) +- [Radio](../radio.mdx) diff --git a/packages/documentation/docs/controls/forms/forms-validation.mdx b/packages/documentation/docs/controls/forms/forms-validation.mdx index 7fb6e844fc..026af88394 100644 --- a/packages/documentation/docs/controls/forms/forms-validation.mdx +++ b/packages/documentation/docs/controls/forms/forms-validation.mdx @@ -7,7 +7,7 @@ import TabItem from '@theme/TabItem'; # Validation
- +

diff --git a/packages/documentation/src/components/ApiTableTag/ApiTableTag.css b/packages/documentation/src/components/ApiTableTag/ApiTableTag.css index 78a7c491f8..99f48423e0 100644 --- a/packages/documentation/src/components/ApiTableTag/ApiTableTag.css +++ b/packages/documentation/src/components/ApiTableTag/ApiTableTag.css @@ -6,35 +6,30 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -.ApiTabTagDeprecated { +.ApiTableTag .Tag { display: inline-block; position: relative; align-self: flex-start; - width: auto; max-width: 25vw; - white-space: nowrap; overflow: hidden; text-overflow: ellipsis; - cursor: default; font-size: 12px; background-color: var(--theme-color-primary); border-radius: 2px; padding: 0.25rem 0.5rem; - color: var(--theme-color-inv-std-text); font: var(--theme-text-default-title-single); - margin: 0.5rem 0; } -.TagDeprecated { - border: 1px solid var(--theme-color-alarm); +.ApiTableTag .Tag.Tag--Deprecated { + background-color: var(--theme-color-alarm); } -.TagDeprecated .Tag__Message--Deprecated { +.ApiTableTag .Tag__Message--Deprecated { color: var(--theme-color-alarm-text); } diff --git a/packages/documentation/src/components/Tags/LegacyTag.css b/packages/documentation/src/components/Tags/LegacyTag.css index 7e52ce6f8d..191fc99a0a 100644 --- a/packages/documentation/src/components/Tags/LegacyTag.css +++ b/packages/documentation/src/components/Tags/LegacyTag.css @@ -16,14 +16,14 @@ gap: 0.25rem; + border: 1px solid var(--theme-color-primary); border-radius: 0.25rem; padding: 0.2rem 0.5rem; - color: var(--theme-color-inv-std-text); font: var(--theme-text-default-title-single); - - border: 1px solid var(--theme-color-primary); - box-sizing: border-box; + color: var(--theme-color-primary); + font-size: 12px; + line-height: 1.5; } a[href].TagContainer { @@ -33,17 +33,3 @@ a[href].TagContainer { div.TagsContainer > .Docs__Tag { margin-right: 0; } - -.TagDeprecatedContainer { - border: 1px solid var(--theme-color-alarm); -} - -.Title { - font-size: 12px; - line-height: 1.5; - color: var(--theme-color-primary); -} - -.TagDeprecatedTitle { - color: var(--theme-color-alarm); -} diff --git a/packages/documentation/src/components/Tags/index.tsx b/packages/documentation/src/components/Tags/index.tsx index 4ca343bb35..010238a0fc 100644 --- a/packages/documentation/src/components/Tags/index.tsx +++ b/packages/documentation/src/components/Tags/index.tsx @@ -13,27 +13,11 @@ export default function LegacyTag(props: { Deprecated since {props.deprecationVersion} )} - - -
- {props.hasDeprecatedAncestor - ? 'Show deprecated version' - : 'Show latest version'} -
+
+ + {props.hasDeprecatedAncestor + ? 'Show deprecated version' + : 'Show latest version'} );