MCPcopy Create free account
hub / github.com/coder/coder / getContentBoxWidth

Function getContentBoxWidth

site/src/components/Tabs/utils/useKebabMenu.ts:211–216  ·  view source on GitHub ↗
(container: HTMLElement)

Source from the content-addressed store, hash-verified

209};
210
211const getContentBoxWidth = (container: HTMLElement): number => {
212 const styles = window.getComputedStyle(container);
213 const paddingLeft = Number.parseFloat(styles.paddingLeft) || 0;
214 const paddingRight = Number.parseFloat(styles.paddingRight) || 0;
215 return container.clientWidth - paddingLeft - paddingRight;
216};
217
218const getTabGap = (container: HTMLElement): number => {
219 const styles = window.getComputedStyle(container);

Callers 1

useKebabMenuFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected