Skip to content

Instantly share code, notes, and snippets.

View mujsdev's full-sized avatar

Muj mujsdev

View GitHub Profile
.table {
display: table;
}
.table p {
display: table-cell;
text-align: center; /* x-axis */
vertical-align: middle; /* y-axis */
}
.box {
position: relative;
}
.box p {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.flexbox-row {
display: flex;
flex-direction: row; /* default value */
justify-content: center; /* x-axis */
align-items: center; /* y-axis */
}
.flexbox-col {
display: flex;
flex-direction: column;
justify-content: center; /* y-axis */
align-items: center; /* x-axis */
}
.grid {
display: grid;
place-items: center;
}
.margins {
display: flex; /* or grid */
}
.margins p {
margin: auto;
}
p {
text-align: center;
}
p {
padding: 80px 0;
}
p {
text-align: center;
padding: 16px 0;
}
@mujsdev
mujsdev / tsconfig.json
Created December 10, 2022 21:43
tsconfig.json for Storybook
{
"compilerOptions": {
"target": "es5",
"module": "ES6",
"jsx": "react",
"outDir": "./dist",
"strict": true,
"moduleResolution": "node",
"esModuleInterop": true,
"skipLibCheck": true,