-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AppCatalog: Adds comp and story for SettingsLink
Signed-off-by: Vincent T <[email protected]>
- Loading branch information
Showing
2 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
app-catalog/src/components/charts/SettingsLink.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Meta, Story } from '@storybook/react'; | ||
import React from 'react'; | ||
import { SettingsLink } from './SettingsLink'; | ||
|
||
export default { | ||
title: 'Components/SettingsLink', | ||
component: SettingsLink, | ||
} as Meta; | ||
|
||
const Template: Story = (args) => <SettingsLink {...args} />; | ||
|
||
export const Title = Template.bind({}); | ||
Title.args = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { Link as RouterLink } from '@kinvolk/headlamp-plugin/lib/CommonComponents'; | ||
import { | ||
Typography, | ||
useTheme, | ||
} from '@mui/material'; | ||
|
||
|
||
|
||
export function SettingsLink() { | ||
const theme = useTheme(); | ||
|
||
return ( | ||
<RouterLink routeName="/settings/plugins/app-catalog" tooltip="App-Catalog Settings"> | ||
<Typography | ||
sx={{ | ||
size: '1rem', | ||
marginLeft: '3rem', | ||
color: theme.palette.text.primary, | ||
}} | ||
> | ||
Settings | ||
</Typography> | ||
</RouterLink> | ||
); | ||
} |