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

fix(column): remove percentage character only if present #15312

Merged
merged 2 commits into from
Dec 11, 2023
Merged
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
6 changes: 4 additions & 2 deletions packages/react/src/components/Grid/Column.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -366,10 +366,12 @@ function getClassNameForBreakpoints(
continue;
}

// If our breakpoint is a string, the user has specified a percent
// If our breakpoint is a string, the user might have specified a percent
// they'd like this column to span.
if (typeof breakpoint === 'string') {
classNames.push(`${prefix}--${name}:col-span-${breakpoint.slice(0, -1)}`);
classNames.push(
`${prefix}--${name}:col-span-${breakpoint.replace('%', '')}`
);
continue;
}

Expand Down