瀏覽代碼

SONAR-22049 Move ToggleButton to sonar-aligned folder

master
stanislavh 2 週之前
父節點
當前提交
7067c5cd8c

+ 1
- 1
server/sonar-web/design-system/src/components/Tabs.tsx 查看文件

@@ -21,8 +21,8 @@ import styled from '@emotion/styled';
import { PropsWithChildren } from 'react';
import tw from 'twin.macro';
import { OPACITY_20_PERCENT, themeBorder, themeColor } from '../helpers';
import { getTabId, getTabPanelId } from '../helpers/tabs';
import { BareButton } from '../sonar-aligned/components/buttons';
import { getTabId, getTabPanelId } from '../sonar-aligned/helpers/tabs';
import { Badge } from './Badge';

type TabValueType = string | number | boolean;

+ 0
- 1
server/sonar-web/design-system/src/components/index.ts 查看文件

@@ -75,7 +75,6 @@ export * from './Tags';
export * from './Text';
export * from './TextAccordion';
export * from './Title';
export * from './ToggleButton';
export { Tooltip } from './Tooltip';
export { TopBar } from './TopBar';
export * from './TreeMap';

+ 0
- 1
server/sonar-web/design-system/src/helpers/index.ts 查看文件

@@ -21,5 +21,4 @@ export * from './colors';
export * from './constants';
export * from './keyboard';
export * from './positioning';
export * from './tabs';
export * from './theme';

server/sonar-web/design-system/src/components/ToggleButton.tsx → server/sonar-web/design-system/src/sonar-aligned/components/ToggleButton.tsx 查看文件

@@ -19,10 +19,10 @@
*/
import styled from '@emotion/styled';
import tw from 'twin.macro';
import { Badge } from '../../components/Badge';
import { themeBorder, themeColor, themeContrast } from '../../helpers/theme';
import { getTabId, getTabPanelId } from '../helpers/tabs';
import { themeBorder, themeColor, themeContrast } from '../helpers/theme';
import { ButtonSecondary } from '../sonar-aligned/components/buttons';
import { Badge } from './Badge';
import { ButtonSecondary } from './buttons';

type ToggleButtonValueType = string | number | boolean;


server/sonar-web/design-system/src/components/__tests__/ToggleButton-test.tsx → server/sonar-web/design-system/src/sonar-aligned/components/__tests__/ToggleButton-test.tsx 查看文件

@@ -19,9 +19,9 @@
*/
import { screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { render } from '../../../helpers/testUtils';
import { FCProps } from '../../../types/misc';
import { getTabPanelId } from '../../helpers';
import { render } from '../../helpers/testUtils';
import { FCProps } from '../../types/misc';
import { ToggleButton, ToggleButtonsOption } from '../ToggleButton';

it('should render all options', async () => {

+ 1
- 0
server/sonar-web/design-system/src/sonar-aligned/components/index.ts 查看文件

@@ -22,5 +22,6 @@ export * from './Card';
export { DismissableFlagMessage, FlagMessage } from './FlagMessage';
export * from './MetricsRatingBadge';
export * from './Table';
export * from './ToggleButton';
export * from './buttons';
export * from './typography';

server/sonar-web/design-system/src/helpers/__tests__/tabs-test.ts → server/sonar-web/design-system/src/sonar-aligned/helpers/__tests__/tabs-test.ts 查看文件


+ 21
- 0
server/sonar-web/design-system/src/sonar-aligned/helpers/index.ts 查看文件

@@ -0,0 +1,21 @@
/*
* SonarQube
* Copyright (C) 2009-2024 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

export * from './tabs';

server/sonar-web/design-system/src/helpers/tabs.ts → server/sonar-web/design-system/src/sonar-aligned/helpers/tabs.ts 查看文件


+ 1
- 0
server/sonar-web/design-system/src/sonar-aligned/index.ts 查看文件

@@ -19,4 +19,5 @@
*/

export * from './components';
export * from './helpers';
export * from './types';

Loading…
取消
儲存