-
Notifications
You must be signed in to change notification settings - Fork 367
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change: [M3-8175] - Refactor KubeConfigDrawer to use CodeBlock and ad…
…d Codeblock story (#11019) ## Description 📝 Refactor KubeConfigDrawer component to use the CodeBlock component for UI consistency. I also moved CodeBlock to the components folder since it is pretty generic and added a story for it ## Changes 🔄 List any change relevant to the reviewer. - Refactor `KubeConfigDrawer` to use `CodeBlock` component and minor cleanup - Moved `CodeBlock` from `features` to `components` folder and decoupled it a bit from Linode Create - Added `CodeBlock` story ## How to test 🧪 ### Prerequisites ### Verification steps (How to verify changes) - Create a cluster pointing to dev API - Once the cluster is provisioned, go to the cluster's details page - Click on View under Kubeconfig - Confirm new UI and no regressions - Delete the cluster afterward - Run storybook locally and confirm CodeBlock story
- Loading branch information
1 parent
47585a9
commit 34d5d1f
Showing
10 changed files
with
99 additions
and
55 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
packages/manager/.changeset/pr-11019-changed-1727727502564.md
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,5 @@ | ||
--- | ||
"@linode/manager": Changed | ||
--- | ||
|
||
Use CodeBlock component in KubeConfigDrawer ([#11019](https://github.com/linode/manager/pull/11019)) |
5 changes: 5 additions & 0 deletions
5
packages/manager/.changeset/pr-11019-tech-stories-1727727527842.md
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,5 @@ | ||
--- | ||
"@linode/manager": Tech Stories | ||
--- | ||
|
||
Add CodeBlock story ([#11019](https://github.com/linode/manager/pull/11019)) |
30 changes: 30 additions & 0 deletions
30
packages/manager/src/components/CodeBlock/CodeBlock.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,30 @@ | ||
import React from 'react'; | ||
|
||
import { CodeBlock } from './CodeBlock'; | ||
|
||
import type { Meta, StoryFn, StoryObj } from '@storybook/react'; | ||
|
||
const meta: Meta<typeof CodeBlock> = { | ||
args: { | ||
command: 'echo "Hello World"', | ||
commandType: 'Test label', | ||
language: 'bash', | ||
}, | ||
component: CodeBlock, | ||
decorators: [ | ||
(Story: StoryFn) => ( | ||
<div style={{ margin: '1em' }}> | ||
<Story /> | ||
</div> | ||
), | ||
], | ||
title: 'Components/CodeBlock', | ||
}; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof CodeBlock>; | ||
|
||
export const Default: Story = { | ||
render: (args) => <CodeBlock {...args} />, | ||
}; |
File renamed without changes.
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
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
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
2 changes: 1 addition & 1 deletion
2
...ages/manager/src/features/Linodes/LinodeCreate/ApiAwarenessModal/IntegrationsTabPanel.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
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
2 changes: 1 addition & 1 deletion
2
packages/manager/src/features/Linodes/LinodeCreate/ApiAwarenessModal/SDKTabPanel.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