mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 22:30:01 +00:00
Add @carbon/layout
This commit is contained in:
20
types/carbon__layout/carbon__layout-tests.ts
Normal file
20
types/carbon__layout/carbon__layout-tests.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import {
|
||||
rem,
|
||||
em,
|
||||
px,
|
||||
breakpoint,
|
||||
breakpoints,
|
||||
breakpointDown,
|
||||
breakpointUp,
|
||||
baseFontSize
|
||||
} from "@carbon/layout";
|
||||
|
||||
const firstBreakpoint = Object.keys(breakpoints)[0];
|
||||
|
||||
rem(baseFontSize); // $ExpectType string
|
||||
em(baseFontSize); // $ExpectType string
|
||||
px(baseFontSize); // $ExpectType string
|
||||
|
||||
breakpoint(firstBreakpoint); // $ExpectType string
|
||||
breakpointUp(firstBreakpoint); // $ExpectType string
|
||||
breakpointDown(firstBreakpoint); // $ExpectType string
|
||||
80
types/carbon__layout/index.d.ts
vendored
Normal file
80
types/carbon__layout/index.d.ts
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
// Type definitions for @carbon/layout 0.0
|
||||
// Project: https://github.com/IBM/carbon-elements/tree/master/packages/layout
|
||||
// Definitions by: Vince Picone <https://github.com/vpicone>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export const baseFontSize: number;
|
||||
|
||||
export const breakpoints: {
|
||||
lg: {
|
||||
columns: number;
|
||||
margin: string;
|
||||
width: string;
|
||||
};
|
||||
max: {
|
||||
columns: number;
|
||||
margin: string;
|
||||
width: string;
|
||||
};
|
||||
md: {
|
||||
columns: number;
|
||||
margin: string;
|
||||
width: string;
|
||||
};
|
||||
sm: {
|
||||
columns: number;
|
||||
margin: string;
|
||||
width: string;
|
||||
};
|
||||
xlg: {
|
||||
columns: number;
|
||||
margin: string;
|
||||
width: string;
|
||||
};
|
||||
};
|
||||
|
||||
export const miniUnit: number;
|
||||
|
||||
export const spacing: number[];
|
||||
|
||||
export function breakpoint(...args: any[]): string;
|
||||
|
||||
export function breakpointDown(name: string): string;
|
||||
|
||||
export function breakpointUp(name: string): string;
|
||||
|
||||
export function em(px: number): string;
|
||||
|
||||
export function miniUnits(count: number): string;
|
||||
|
||||
export function px(value: number): string;
|
||||
|
||||
export function rem(px: number): string;
|
||||
|
||||
export namespace breakpoint {
|
||||
const prototype: {};
|
||||
}
|
||||
|
||||
export namespace breakpointDown {
|
||||
const prototype: {};
|
||||
}
|
||||
|
||||
export namespace breakpointUp {
|
||||
const prototype: {};
|
||||
}
|
||||
|
||||
export namespace em {
|
||||
const prototype: {};
|
||||
}
|
||||
|
||||
export namespace miniUnits {
|
||||
const prototype: {};
|
||||
}
|
||||
|
||||
export namespace px {
|
||||
const prototype: {};
|
||||
}
|
||||
|
||||
export namespace rem {
|
||||
const prototype: {};
|
||||
}
|
||||
19
types/carbon__layout/tsconfig.json
Normal file
19
types/carbon__layout/tsconfig.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": ["es6"],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": ["../"],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"paths": {
|
||||
"@carbon/layout": ["carbon__layout"]
|
||||
}
|
||||
},
|
||||
"files": ["index.d.ts", "carbon__layout-tests.ts"]
|
||||
}
|
||||
1
types/carbon__layout/tslint.json
Normal file
1
types/carbon__layout/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user