diff --git a/packages/ncids-css/packages/nci-pull-quote/_index.scss b/packages/ncids-css/packages/nci-pull-quote/_index.scss new file mode 100644 index 000000000..14b4eb54f --- /dev/null +++ b/packages/ncids-css/packages/nci-pull-quote/_index.scss @@ -0,0 +1 @@ +@use './internal/nci-pull-quote'; diff --git a/packages/ncids-css/packages/nci-pull-quote/internal/_nci-pull-quote.scss b/packages/ncids-css/packages/nci-pull-quote/internal/_nci-pull-quote.scss new file mode 100644 index 000000000..bc84af707 --- /dev/null +++ b/packages/ncids-css/packages/nci-pull-quote/internal/_nci-pull-quote.scss @@ -0,0 +1,70 @@ +@use 'uswds-core' as *; +@use "sass:meta" as meta; + +.nci-pull-quote { + @include u-display('flex'); + border-left: 3px solid color('accent-warm'); + flex-direction: column; + flex-wrap: wrap; + @include u-padding-y(1.5); + @include u-padding-x(2.5); + @include at-media('tablet') { + flex-direction: row; + } + + &__container { + flex: 1; + } + + &__with-image { + & .nci-pull-quote__container { + @include at-media('tablet') { + margin-inline-end: units(3); + } + } + } + + &__body { + @include u-font('body', 'md'); + @include u-text('italic'); + @include u-text(600); + @include u-line-height('body', 3); + @include u-padding(0); + margin-block-start: 0; + margin-block-end: units(2.5); + } + + &__author, + &__title { + @include u-font('body', 'xs'); + @include u-text(400); + @include u-line-height('body', 4); + margin-block-start: 0; + margin-block-end: 0; + } + &__author { + margin-block-start: units(2.5); + } + + &__image { + background: #eee; + border: 4px solid #aaa; + border-radius: 50%; + @include u-display('block'); + margin: 20px auto 0 auto; + width: 225px; + height: 225px; + @include at-media('tablet') { + flex: 0 1 auto; + margin-block-start: 0; + } + } + + @include at-media('tablet') { + background-position: 0px 12px; + } + + @include at-media('desktop') { + background-position: 0px 0px; + } +} diff --git a/packages/ncids-css/packages/ncids/_index.scss b/packages/ncids-css/packages/ncids/_index.scss index c00f45290..22ef5b7fc 100644 --- a/packages/ncids-css/packages/ncids/_index.scss +++ b/packages/ncids-css/packages/ncids/_index.scss @@ -27,6 +27,7 @@ @forward 'usa-list'; @forward 'usa-section'; @forward 'usa-skipnav'; +@forward 'nci-pull-quote'; // USWDS // ------------------------------------- diff --git a/packages/ncids-twig/components/nci-pull-quote/nci-pull-quote.twig b/packages/ncids-twig/components/nci-pull-quote/nci-pull-quote.twig new file mode 100644 index 000000000..c53fffa98 --- /dev/null +++ b/packages/ncids-twig/components/nci-pull-quote/nci-pull-quote.twig @@ -0,0 +1,10 @@ +
+
+

{{ body }}

+

{{ author }}

+

{{ title }}

+
+{% if image %} +
 
+{% endif %} +
diff --git a/testing/ncids-css-testing/src/stories/components/nci-pull-quote/index.scss b/testing/ncids-css-testing/src/stories/components/nci-pull-quote/index.scss new file mode 100644 index 000000000..c24829c75 --- /dev/null +++ b/testing/ncids-css-testing/src/stories/components/nci-pull-quote/index.scss @@ -0,0 +1,2 @@ +@forward "styles/ncids"; +@forward "nci-pull-quote"; diff --git a/testing/ncids-css-testing/src/stories/components/nci-pull-quote/nci-pull-quote.default.stories.jsx b/testing/ncids-css-testing/src/stories/components/nci-pull-quote/nci-pull-quote.default.stories.jsx new file mode 100644 index 000000000..fb8a8f730 --- /dev/null +++ b/testing/ncids-css-testing/src/stories/components/nci-pull-quote/nci-pull-quote.default.stories.jsx @@ -0,0 +1,17 @@ +import Component from '@nciocpl/ncids-twig/components/nci-pull-quote/nci-pull-quote.twig'; +import css from './index.scss?inline'; + +export default { + title: 'components/Pull Quote/Default', + component: Component, + parameters: { css }, +}; + +export const NCIPullQuote = { + args: { + body: + 'Mauris vehicula erat quis facilisis laoreet. Mauris eget vestibulum diam, quis pulvinar odio. Aenean nec eros ligula. Aliquam erat divvolutpat. Quisque volutpat nisl risus', + author: 'Stephen J. Chanock, M.D.', + title: 'Division of Cancer Epidemiology & Genetics Director', + }, +};