Skip to content

Instantly share code, notes, and snippets.

View nautilytics's full-sized avatar

Nautilytics nautilytics

View GitHub Profile
@nautilytics
nautilytics / Typography.tsx
Created May 21, 2024 17:31
Typography.tsx
import { PropsWithChildren, FC } from 'react'
import classnames from 'classnames'
type TypographyProps = PropsWithChildren<{ color?: string; className?: string; title?: string }>
export const H1: FC<TypographyProps> = ({
children,
color = '',
className: customClasses,
...props
@nautilytics
nautilytics / README.md
Created January 17, 2024 23:42
Setting up formatting and GitHub actions

Installation Instructions

GitHub Action

  • Inspiration from WPILib
  • Create a new file in .github/workflows/build.yml
  • Copy the contents of build.yml into that new file

Formatting

@nautilytics
nautilytics / mui-style-utils.ts
Created October 5, 2022 22:36
An example of extending the MUI style utility functions and a custom theme
import {createStyled} from '@mui/system';
import {useTheme} from '@mui/material';
import type { MuiCustomThemeT } from './types';
export const muiStyled = createStyled<MuiCustomThemeT>();
export const muiUseTheme = useTheme<MuiCustomThemeT>();
@nautilytics
nautilytics / pull_request_template.txt
Last active September 13, 2022 19:50
A sample GitHub pull request template w a Release Notes section
## Dev Summary
[Figma](link)
[JIRA](link)
<!-- A detailed outline of what this pull requests includes -->
## Release Notes
<!--
@nautilytics
nautilytics / percy-test.yml
Created September 12, 2022 22:01
A GitHub Action for running Percy across Storybook Scenarios
name: Run Percy.io across Storybook Scenarios
on:
pull_request:
branches: [ main ]
jobs:
percy:
if: github.actor != 'dependabot[bot]' && github.actor != 'renovate[bot]'
runs-on: ubuntu-latest
@nautilytics
nautilytics / sample-tokens.json
Created September 12, 2022 21:03
A sample set of design tokens
{
"spacing": {
"xxxx-small": "2px",
"xxx-small": "4px"
},
"color": {
"brand-primary-125": "#D14334",
"brand-primary": "#FF5B4A"
},
"font-size": {
@nautilytics
nautilytics / Input.tsx
Created September 12, 2022 20:51
An example of using a custom theme to style a BaseWeb Input
import * as React from 'react';
import {
Input as BaseInput,
StyledEndEnhancer as BaseStyledEndEnhancer,
StyledStartEnhancer as BaseStyledStartEnhancer,
} from 'baseui/input'
import type { InputProps } from './types';
import { themedWithStyle as withStyle } from '../style-utils'
import { padding } from 'polished'
@nautilytics
nautilytics / ToggleButton.tsx
Last active August 5, 2022 14:59
An example of using a custom theme to style a MUI ToggleButton
import * as React from 'react';
import {
ToggleButton as MuiToggleButton,
styled,
} from '@mui/material';
import type { ToggleButtonProps } from '@mui/material';
import { border, margin, padding } from 'polished';
import { typography as labelTypography } from '../Typography/Labels/constants';
import { FontWeight } from '../constants';
@nautilytics
nautilytics / question-v1.ts
Last active April 24, 2022 19:22
The types related to Question
type ValueNumberNodeType = {
value?: number,
};
type BasePredicate = {
nodeType: |
'ALL' | 'ANY' | 'AND' | 'BOOLEAN' | 'EQUALS_NUMBER' | 'GEOPOINT' | 'GREATER_THAN' |
'IS_INSIDE_REGION' | 'IS_NOT_SELECTED' | 'IS_SELECTED' | 'LESS_THAN' | 'NOT' |
'NOT_EQUALS_NUMBER' | 'NUMBER' | 'OR' | 'TEXT',
ref?: {
@nautilytics
nautilytics / boston-ma-target.geojson
Last active October 8, 2021 13:48
Target Locations in Major Cities
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.