diff --git a/packages/core-components/src/layout/Content/Content.stories.tsx b/packages/core-components/src/layout/Content/Content.stories.tsx new file mode 100644 index 0000000000..fcf8858adc --- /dev/null +++ b/packages/core-components/src/layout/Content/Content.stories.tsx @@ -0,0 +1,50 @@ +/* + * Copyright 2024 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import React from 'react'; +import { Content } from './Content'; + +export default { + title: 'Layout/Content', + component: Content, +}; + +type Props = { + stretch?: boolean; + noPadding?: boolean; + className?: string; +}; + +export const Default = (args: Props) => ( + +
This is child of content component
+
+); + +Default.args = { + stretch: false, + noPadding: false, +}; + +export const WithNoPadding = (args: Props) => ( + +
This is child of content component
+
+); + +WithNoPadding.args = { + stretch: true, + noPadding: true, +}; diff --git a/packages/core-components/src/layout/HeaderActionMenu/HeaderActionMenu.stories.tsx b/packages/core-components/src/layout/HeaderActionMenu/HeaderActionMenu.stories.tsx new file mode 100644 index 0000000000..dc50456f7e --- /dev/null +++ b/packages/core-components/src/layout/HeaderActionMenu/HeaderActionMenu.stories.tsx @@ -0,0 +1,45 @@ +/* + * Copyright 2024 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import React from 'react'; +import { HeaderActionMenu, HeaderActionMenuProps } from './HeaderActionMenu'; + +export default { + title: 'Layout/HeaderActionMenu', + component: HeaderActionMenu, +}; + +export const Default = (args: HeaderActionMenuProps) => ( + +); +Default.args = { + actionItems: [ + { + label: 'Item 1', + secondaryLabel: 'Item 1 secondary label', + disabled: false, + }, + { + label: 'Item 2', + secondaryLabel: 'Item 2 secondary label', + disabled: true, + }, + { + label: 'Item 3', + secondaryLabel: 'Item 3 secondary label', + disabled: true, + }, + ], +}; diff --git a/packages/core-components/src/layout/HeaderLabel/HeaderLabel.stories.tsx b/packages/core-components/src/layout/HeaderLabel/HeaderLabel.stories.tsx new file mode 100644 index 0000000000..58566a27d2 --- /dev/null +++ b/packages/core-components/src/layout/HeaderLabel/HeaderLabel.stories.tsx @@ -0,0 +1,35 @@ +/* + * Copyright 2024 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import React from 'react'; +import { HeaderLabel } from './HeaderLabel'; + +export default { + title: 'Layout/HeaderLabel', + component: HeaderLabel, +}; + +type HeaderLabelProps = { + label: string; + value?: string; + url?: string; +}; + +export const Default = (args: HeaderLabelProps) => ; +Default.args = { + label: 'This is label', + value: 'This is value', + url: 'https://backstage.io', +};