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

Just typo corrections. #228

Merged
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions src/extractor/extractGrids.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const rowColumnValues = (grid: RowsColsLayoutGrid) => ({
value: grid.pattern.toLowerCase() as GridPattern,
type: 'string' as PropertyType
},
// undefined when aligment stretch
// undefined when alignment stretch
...(grid.sectionSize !== undefined && {
sectionSize: {
value: grid.sectionSize,
Expand All @@ -54,7 +54,7 @@ const rowColumnValues = (grid: RowsColsLayoutGrid) => ({
type: 'string' as PropertyType
},
count: getCount(grid.count),
// undefined when aligment centred
// undefined when alignment centred
...(grid.offset !== undefined && {
offset: {
value: grid.offset,
Expand Down
2 changes: 1 addition & 1 deletion src/extractor/extractMotion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ const formatEasingFunction = easingObject => {
}

const easing = (easing: Easing): easingPropertyInterface => {
// abort if invalif easing type
// abort if invalid easing type
if (!('type' in easing) || easings[easing.type] === undefined) {
return undefined
}
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ if (figma.command === commands.demo) {
*/
if (figma.command === commands.reset) {
resetSettings()
// semd message
// send message
figma.notify('⚙️ Settings have been reset.')
figma.closePlugin()
}
Expand Down
2 changes: 1 addition & 1 deletion src/transformer/originalFormatTransformer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const defaultValueTransformer = propertyGroupValues => {
}
// define object
const transformedProperties = {}
// transform proeprties
// transform properties
Object.keys(propertyGroupValues).forEach(function (key) {
// if this is the final level
if (Object.prototype.hasOwnProperty.call(propertyGroupValues[key], 'value')) {
Expand Down
4 changes: 2 additions & 2 deletions src/ui/components/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ export const Select = ({
}

const expandButtonClass = isExpanded ? 'select-menu__button--active' : ''
const expanListClass = isExpanded ? 'select-menu__menu--active' : ''
const expandListClass = isExpanded ? 'select-menu__menu--active' : ''
const disabledColorClass = isDisabled ? 'icon--black-3' : ''

return (
Expand All @@ -282,7 +282,7 @@ export const Select = ({
</span>
</button>
<ul
className={`select-menu__menu ${expanListClass} ${disabledColorClass}`}
className={`select-menu__menu ${expandListClass} ${disabledColorClass}`}
style={{ top: '-24px' }}
>
{options &&
Expand Down
6 changes: 3 additions & 3 deletions src/ui/modules/downloadJson.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ export const downloadJson = (parent, link: HTMLLinkElement, json: string) => {
link.href = `data:application/design-tokens+json;charset=utf-8,${encodeURIComponent(json)}`
// Programmatically trigger a click on the anchor element
link.click()
// send success messgae
// send success message
parent.postMessage({
pluginMessage: {
command: commands.closePlugin,
payload: {
notification: '🎉 Design token export succesfull!'
notification: '🎉 Design token export successful!'
}
} as PluginMessage
}, '*')
} catch (error) {
// send success messgae
// send success message
parent.postMessage({
pluginMessage: {
command: commands.closePlugin,
Expand Down
2 changes: 1 addition & 1 deletion src/ui/modules/urlExport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const responeHandler = (request: XMLHttpRequest): string => {
}
// if other error
if (request.status > 399) {
return `🚨 ${request.status}: An error occured, please check the console for details.`
return `🚨 ${request.status}: An error occurred, please check the console for details.`
}
// if no error
return '🎉 Design tokens pushed to server!'
Expand Down
2 changes: 1 addition & 1 deletion src/utilities/accessToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const getAccessToken = async (fileId: string): Promise<string> => {
}
/**
* @name setAccessToken
* @description store the access token for the current fiven file in the user clientStorage
* @description store the access token for the current given file in the user clientStorage
* @param fileId {string} — ID of the current file
* @param fileId {string} — access token
*/
Expand Down
2 changes: 1 addition & 1 deletion src/utilities/deepMerge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const deepMerge = (target, source) => {
if (!isObject(target) || !isObject(source)) {
return source
}
// iteratre over source
// iterate over source
Object.keys(source).forEach(key => {
// get values from both target and source for the given key
const targetValue = target[key]
Expand Down
2 changes: 1 addition & 1 deletion src/utilities/getTokenNodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const getTokenNodes = (pages: PageNode[]): customTokenNode[] => {
const tokenFrames = getFrameNodes(pages)
// get all children of token frames
return tokenFrames.map(frame => <ComponentSetNode[] | ComponentNode[] | RectangleNode[] | FrameNode[]>frame
// check if children are of valide types
// check if children are of valid types
.findAll(
/* istanbul ignore next */
node => isTokenNode(node)
Expand Down
4 changes: 2 additions & 2 deletions src/utilities/groupByName.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const groupByKeyAndName = (tokenArray: OriginalFormatTokenInterface[] | S
const removeName: boolean = true
// guard
if (tokenArray.length <= 0) return []
// nest tokens into object with hierachy defined by name using /
// nest tokens into object with hierarchy defined by name using /
const groupedTokens = tokenArray.map(token => {
// split token name into array
// remove leading and following whitespace for every item
Expand All @@ -28,6 +28,6 @@ export const groupByKeyAndName = (tokenArray: OriginalFormatTokenInterface[] | S
// return
return nestedObjectFromArray(groupsFromName, token)
})
// return merged object of tokens grouped by name hierachy
// return merged object of tokens grouped by name hierarchy
return groupedTokens.reduce((accumulator = {}, currentValue) => deepMerge(accumulator, currentValue))
}
2 changes: 1 addition & 1 deletion src/utilities/prefixTokenName.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const getExportKey = (token: OriginalFormatTokenInterface | StandardTokenInterfa
export const prefixTokenName = (tokenArray: OriginalFormatTokenInterface[] | StandardTokenInterface[], userSettings: Settings) => {
// guard
if (tokenArray.length <= 0) return []
// nest tokens into object with hierachy defined by name using /
// nest tokens into object with hierarchy defined by name using /
return tokenArray.map(token => {
// remove top level prefix from name if desired
if (userSettings.prefixInName === false) {
Expand Down