Get a value by object representing the theme
value: String | (theme) => String | Number
: Value to be findtheme: String
: An object with
value: String | Number
: A string or number representing the object id.
import { getTheme } from '@platformbuilders/helpers';
const theme = {
black: '#000',
white: '#FFF',
};
getTheme('black')({ theme }); // return '#000'
getTheme((theme) => theme.white)({ theme }); // return '#FFF'