Skip to content

Instantly share code, notes, and snippets.

View dimasbaguspm's full-sized avatar
:shipit:
Enlightened

Dimas Bagus P dimasbaguspm

:shipit:
Enlightened
View GitHub Profile
// ============================================
// LOCAL STORAGE ADAPTER
// ============================================
class StorageAdapter {
constructor(storageKey) {
this.storageKey = storageKey;
}
// Create
create(item) {
import React, { FC, HTMLAttributes, ReactNode } from 'react';
export interface IModal extends HTMLAttributes<HTMLDivElement> {
children: ReactNode;
}
const Modal: FC<IModal> = ({ children, className, ...rest }) => {
return (
<>
<div className='modal-bg'></div>
<div className={`modal-children ${className}`} {...rest}>