Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
benjackwhite committed Nov 22, 2023
1 parent 84e39ca commit 71d637d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Meta, StoryFn, StoryObj } from '@storybook/react'

import { Textfit } from './Textfit2'
import { Textfit } from './Textfit'

type Story = StoryObj<typeof Textfit>
const meta: Meta<typeof Textfit> = {
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/scenes/insights/views/BoldNumber/Textfit.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useRef } from 'react'
import useResizeObserver from 'use-resize-observer'

export type TextfitProps = React.HTMLAttributes<HTMLDivElement> & {
export type TextfitProps = {
min: number
max: number
children: string
Expand All @@ -10,7 +10,6 @@ export type TextfitProps = React.HTMLAttributes<HTMLDivElement> & {
export const Textfit = ({ min, max, children }: TextfitProps): JSX.Element => {
const parentRef = useRef<HTMLDivElement>(null)
const childRef = useRef<HTMLDivElement>(null)

const fontSizeRef = useRef<number>(min)

let resizeTimer: NodeJS.Timeout
Expand Down

0 comments on commit 71d637d

Please sign in to comment.