Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(carousel): remove page-size knob #4921

Merged
merged 1 commit into from
Jan 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
/**
* @license
*
* Copyright IBM Corp. 2020
* Copyright IBM Corp. 2020, 2021
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/

import React from 'react';
import { number } from '@storybook/addon-knobs';
import ArrowRight20 from '@carbon/icons-react/es/arrow--right/20.js';
// Below path will be there when an application installs `@carbon/ibmdotcom-web-components` package.
// In our dev env, we auto-generate the file and re-map below path to to point to the generated file.
Expand Down Expand Up @@ -40,10 +39,9 @@ const Card = ({ copy = copyDefault, heading = headingDefault, href = hrefDefault
</DDSCard>
);

export const Default = ({ parameters }) => {
const { pageSize } = parameters?.props?.Carousel ?? {};
export const Default = () => {
return (
<DDSCarousel pageSize={pageSize}>
<DDSCarousel>
<Card />
<Card copy={copyOdd} />
<Card />
Expand All @@ -57,10 +55,5 @@ export default {
title: 'Components/Carousel',
parameters: {
...readme.parameters,
knobs: {
Carousel: ({ groupId }) => ({
pageSize: number('Page size (pageSize)', null!, groupId),
}),
},
},
};
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
/**
* @license
*
* Copyright IBM Corp. 2020
* Copyright IBM Corp. 2020, 2021
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/

import { html } from 'lit-element';
import { number } from '@storybook/addon-knobs';
// Below path will be there when an application installs `carbon-web-components` package.
// In our dev env, we auto-generate the file and re-map below path to to point to the generated file.
// @ts-ignore
Expand Down Expand Up @@ -42,10 +41,9 @@ const Card = ({ copy = copyDefault, heading = headingDefault, href = hrefDefault
</dds-card>
`;

export const Default = ({ parameters }) => {
const { pageSize } = parameters?.props?.Carousel ?? {};
export const Default = () => {
return html`
<dds-carousel page-size="${ifNonNull(pageSize)}">
<dds-carousel>
${Card()}${Card({ copy: copyOdd })}${Card()}${Card({ copy: copyOdd })}${Card()}
</dds-carousel>
`;
Expand All @@ -55,10 +53,5 @@ export default {
title: 'Components/Carousel',
parameters: {
...readme.parameters,
knobs: {
Carousel: ({ groupId }) => ({
pageSize: number('Page size (page-size)', null!, groupId),
}),
},
},
};