Skip to content

Commit

Permalink
Merge branch 'master' into footer-language-only
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] authored Jan 8, 2021
2 parents e2fe580 + 0b7cdbe commit ea5db15
Showing 1 changed file with 6 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
/**
* @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 { select } from '@storybook/addon-knobs';
import { html } from 'lit-element';
import ArrowRight20 from 'carbon-web-components/es/icons/arrow--right/20';
import ifNonNull from 'carbon-web-components/es/globals/directives/if-non-null.js';
import readme from './README.stories.mdx';
import textNullable from '../../../../.storybook/knob-text-nullable';
Expand Down Expand Up @@ -132,9 +131,7 @@ export const Default = ({ parameters }) => {
)}
<dds-card-cta slot="footer" cta-type="${ifNonNull(ctaType)}" href="${ifNonNull(href)}">
${ctaCopy}
<dds-card-cta-footer>
${ArrowRight20({ slot: 'icon' })}
</dds-card-cta-footer>
<dds-card-cta-footer></dds-card-cta-footer>
</dds-card-cta>
</dds-content-group-simple>
`;
Expand All @@ -158,9 +155,7 @@ export const WithImage = ({ parameters }) => {
)}
<dds-card-cta slot="footer" cta-type="${ifNonNull(ctaType)}" href="${ifNonNull(href)}">
${ctaCopy}
<dds-card-cta-footer>
${ArrowRight20({ slot: 'icon' })}
</dds-card-cta-footer>
<dds-card-cta-footer></dds-card-cta-footer>
</dds-card-cta>
</dds-content-group-simple>
`;
Expand All @@ -184,9 +179,7 @@ export const WithVideo = ({ parameters }) => {
)}
<dds-card-cta slot="footer" cta-type="${ifNonNull(ctaType)}" href="${ifNonNull(href)}">
${ctaCopy}
<dds-card-cta-footer>
${ArrowRight20({ slot: 'icon' })}
</dds-card-cta-footer>
<dds-card-cta-footer></dds-card-cta-footer>
</dds-card-cta>
</dds-content-group-simple>
`;
Expand Down Expand Up @@ -219,11 +212,11 @@ export default {
heading: textNullable('Heading (heading)', 'Curabitur malesuada varius mi eu posuere', groupId),
}),
CardCTA: ({ groupId }) => {
const ctaType = select('CTA type (cta-type)', ctaTypes, null, groupId);
const ctaType = select('CTA type (cta-type)', ctaTypes, CTA_TYPE.LOCAL, groupId);
return {
copy: textNullable('Copy text (copy)', 'Lorem ipsum dolor sit amet', groupId),
ctaType,
href: textNullable(knobNamesForType[ctaType ?? CTA_TYPE.REGULAR], hrefsForType[ctaType ?? CTA_TYPE.REGULAR], groupId),
href: textNullable(knobNamesForType[ctaType ?? CTA_TYPE.LOCAL], hrefsForType[ctaType ?? CTA_TYPE.LOCAL], groupId),
};
},
},
Expand Down

0 comments on commit ea5db15

Please sign in to comment.