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

(#1589) Updates usa-list twig and styles, storybook structure #1620

Merged
merged 1 commit into from
Apr 17, 2024

Conversation

dlescarbeau
Copy link
Collaborator

Closes #1589

@dlescarbeau dlescarbeau requested a review from a team as a code owner March 27, 2024 21:12
Copy link

@dlescarbeau dlescarbeau force-pushed the ticket/1589-usa-list-storybook-update branch 3 times, most recently from b946b3b to 7e2275a Compare March 28, 2024 15:52
@dlescarbeau dlescarbeau requested a review from a team as a code owner March 28, 2024 15:52
@dlescarbeau dlescarbeau force-pushed the ticket/1589-usa-list-storybook-update branch 2 times, most recently from 06ea914 to 8060754 Compare March 28, 2024 16:42
Copy link

@andyvanavery31 andyvanavery31 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

{% endif %}
{% set classes = class ~ class1 ~ class2 %}

{% if ordered %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clean up filter and indents:

{% set class = "usa-list" %}
{% if "twoColumn" in variant %}
	{% set class = class + " usa-list--two-column" %}
{% endif %}
{% if "unstyled" in variant %}
	{% set class = class + " usa-list--unstyled" %}
{% endif %}

{% if ordered %}
	<ol class="{{ class }}">
{% else %}
	<ul class="{{ class }}">
{% endif %}
	{% for item in items %}
		<li>{{ item }}</li>
	{% endfor %}
{% if ordered %}
	</ol>
{% else %}
	</ul>
{% endif %}


const Template = (args) => Component(args);

export const USWDSList = () => <TestCase css={css} html={Template.bind({})()} />;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need a USWDS test case. That's really only for USWDS HTML with NCIDS JS. Remove this and the scenarios.

import css from './index.scss';

export default {
title: 'Components/usa-list/Default',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename to List

import css from './index.scss';

export default {
title: 'Components/usa-list/Modifiers',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename to List

@dlescarbeau dlescarbeau force-pushed the ticket/1589-usa-list-storybook-update branch 5 times, most recently from 04d1cce to 0496e32 Compare April 17, 2024 14:32
@dlescarbeau dlescarbeau force-pushed the ticket/1589-usa-list-storybook-update branch from 0496e32 to c5d1a85 Compare April 17, 2024 14:33
@olitharp-nci olitharp-nci merged commit 26c415b into develop Apr 17, 2024
3 checks passed
@olitharp-nci olitharp-nci deleted the ticket/1589-usa-list-storybook-update branch April 17, 2024 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update storybook structure for usa-list
4 participants