Skip to content

Commit

Permalink
fix(docTokenTable): the algorithm to sort the components was incorrect (
Browse files Browse the repository at this point in the history
  • Loading branch information
ju-Skinner authored Aug 28, 2024
1 parent 357353d commit b6419ec
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,7 @@ const DocTokenTable: React.FC<DocTokenTableProps> = ({ category }) => {

// sets and sorts data based on numerical value
// and ignores box-shadow and color
const data = ['box-shadow', 'color'].includes(category)
? entries
: entries.sort(([ , tokenA], [ , tokenB]) =>
parseInt(tokenA.value as string) - parseInt(tokenB.value as string)
)
const data = entries.sort((tokenKeyA, tokenKeyB) => parseInt(tokenKeyA[0]) - parseInt(tokenKeyB[0]));

return data.map(([key, token]): JSX.Element => {

Expand Down

0 comments on commit b6419ec

Please sign in to comment.