Skip to content

Commit

Permalink
fix(column): remove percentage character only if present (#15312)
Browse files Browse the repository at this point in the history
Co-authored-by: Guilherme Datilio Ribeiro <guilhermedatilio@gmail.com>
  • Loading branch information
janhassel and guidari committed Dec 11, 2023
1 parent b68d712 commit 7ebcca1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/react/src/components/Grid/Column.tsx
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

0 comments on commit 7ebcca1

Please sign in to comment.