From 496ef2d08b61d168329354d6794f88f2541d5adf Mon Sep 17 00:00:00 2001 From: Sergey Myssak Date: Tue, 20 Jun 2023 07:23:54 +0600 Subject: [PATCH] Remove Split button from OUI docs (#805) (#812) Signed-off-by: Sergey Myssak Co-authored-by: Andrey Myssak --- src-docs/src/views/button/button_example.js | 48 --------------------- src-docs/src/views/button/split_button.js | 48 --------------------- 2 files changed, 96 deletions(-) delete mode 100644 src-docs/src/views/button/split_button.js diff --git a/src-docs/src/views/button/button_example.js b/src-docs/src/views/button/button_example.js index cafa2fc3fb..b864a9b9e5 100644 --- a/src-docs/src/views/button/button_example.js +++ b/src-docs/src/views/button/button_example.js @@ -81,27 +81,6 @@ const buttonIconSnippet = [ />`, ]; -import SplitButton from './split_button'; -const splitButtonSource = require('!!raw-loader!./split_button'); -const splitButtonHtml = renderToHtml(SplitButton); -const splitButtonSnippet = [ - ` - - - Primary action - - - - - -`, -]; - import ButtonGhost from './button_ghost'; const buttonGhostSource = require('!!raw-loader!./button_ghost'); const buttonGhostHtml = renderToHtml(ButtonGhost); @@ -379,33 +358,6 @@ export const ButtonExample = { snippet: buttonIconSnippet, demo: , }, - { - title: 'Split buttons', - source: [ - { - type: GuideSectionTypes.JS, - code: splitButtonSource, - }, - { - type: GuideSectionTypes.HTML, - code: splitButtonHtml, - }, - ], - text: ( - <> -

- OUI does not support split buttons specifically. Instead, we - recommend using separate buttons for the main and overflow actions. - You can achieve this by simply using the display{' '} - and size props OuiButtonIcon to - match that of the primary action button. -

- - ), - props: { OuiButton, OuiButtonIcon }, - snippet: splitButtonSnippet, - demo: , - }, { title: 'Toggle buttons', source: [ diff --git a/src-docs/src/views/button/split_button.js b/src-docs/src/views/button/split_button.js deleted file mode 100644 index 99bb3fb903..0000000000 --- a/src-docs/src/views/button/split_button.js +++ /dev/null @@ -1,48 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - * Modifications Copyright OpenSearch Contributors. See - * GitHub history for details. - */ - -import React from 'react'; - -import { - OuiButton, - OuiButtonIcon, - OuiFlexGroup, - OuiFlexItem, -} from '../../../../src/components'; - -const colors = ['primary', 'text', 'accent', 'success', 'warning', 'danger']; - -export default () => ( - <> - {colors.map((color) => ( - - - - Last 15 min - - - - - - - ))} - -);