Skip to content

Commit

Permalink
feat(natds-search-tokens): hidden typographySize
Browse files Browse the repository at this point in the history
affects: natds-search-tokens
DSY-4184
  • Loading branch information
vagnerbarbosant committed Feb 26, 2024
1 parent 974f4d7 commit 8d3757b
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions packages/natds-token-search/src/Table.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,20 +91,24 @@ const renderBody = pipe(
values,
join('')
)
const keysToRemove = ['colorNeutral50',
'colorNeutral100', 'colorNeutral200',
'colorNeutral300', 'colorNeutral400',
'colorNeutral500', 'colorNeutral600',
'colorNeutral700', 'colorNeutral800',
'colorNeutral900'

const removeFilterString = (obj, searchString) => {
const transformObjInArray = Object.entries(obj)
const filterObj = transformObjInArray.filter(([key]) => typeof key === 'string' && !key.includes(searchString))
const resultObj = Object.fromEntries(filterObj)
return resultObj
}

const keysToRemove = [
]
function removeKeys(obj) {
for (const key of keysToRemove) {
if (obj.hasOwnProperty(key)) {
delete obj[key]
}
}
return obj
const ObjFiltered = removeFilterString(obj, 'typographyFontSizeLevel')
return ObjFiltered
}

export const Table = () => {
Expand Down

0 comments on commit 8d3757b

Please sign in to comment.