Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
bichikim committed Jan 2, 2023
1 parent a11d0ac commit 5f1f7df
Show file tree
Hide file tree
Showing 7 changed files with 3,372 additions and 13,017 deletions.
1 change: 1 addition & 0 deletions coong/coong-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"@iconify/json": "^2.1.151",
"@ts-gql/babel-plugin": "^0.1.0",
"@types/node": "^18.11.14",
"vite-ssg": "^0.22.1",
"@vitejs/plugin-vue": "4.0.0",
"@vitejs/plugin-vue-jsx": "3.0.0",
"@vue/server-renderer": "^3.2.45",
Expand Down
1 change: 1 addition & 0 deletions packages/utils/src/array/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export * from './chunk'
export * from './drop'
export * from './join'
export * from './last'
export * from './map'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import {toNumber} from 'src/number/to-number'

const unitRegex = /^((?:[+-]?[0-9]{1,10})?(?:\.[0-9]{1,10})?)(?:px|r?em)?$/iu
export const getSize = (size: number | string, failValue: number = 0) => {
// todo
}

export const getPxSize = (size: number | string, failValue: number = 0): number => {
if (typeof size === 'number') {
return size
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
import {getPxSize} from 'src/get-px-size'
import {getPxSize} from 'src/string/get-px-size'
import {addUnit} from 'src/string/add-unit'
export type EmOrRem = 'em' | 'rem'

const DEFAULT_BASE_SIZE = 16

export const toUnit = (size: number | string, type: string = 'px') => {
const _size = getPxSize(size)

return addUnit(_size, type)
}

/**
* px size 를 em size 로 바꾸어 줍니다
* @param size
Expand Down
Loading

0 comments on commit 5f1f7df

Please sign in to comment.